home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_20_1987_Transactor_Publishing.d64
/
copy-all64 glink
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
5KB
|
137 lines
1 rem save"0:copyall 64 glink",8
2 rem ** jim butterfield's c64 copy-all
3 rem ** modified for use with the glink ieee-488 interface
4 rem ** richard evers 07-06-1987
5 :
6 rem ** allows concurrent copying of data
7 rem ** serial to ieee-488, ieee-488 to serial
8 rem ** serial to serial or ieee-488 to ieee-488
9 rem ** via transactor's glink ieee-488 interface
10 :
11 rem ** transactor publishing inc.
12 rem ** 85 west wilmot st., #10
13 rem ** richmond hill,ontario, canada
14 rem ** l4b-1k7 (416) 764-5273
15 :
16 print "[147] disk copy-all jim butterfield"
17 print "** glink ieee-488 interface version **"
18 print " copies between serial and ieee drives"
19 a$="!jim butterfield!": a$=a$+a$+a$: a$=a$+a$+a$+a$+a$
20 p$=""
21 dim l2(232),l1%(232),n$(232),t%(232),t$(4)
22 data xxx,seq,prg,usr,rel
23 for j=0 to 4: read t$(j): nextj
24 :
25 rem when size=3956 then code begins at 6005
26 z1=6027: rem entry point #1
27 z2=z1+3: rem entry point #2
28 z3=z2+3: rem entry point #3
29 z4=z3+3: rem entry point #4
30 init=z4+3: rem move rom to ram, etc.
31 swap=init+3: rem swap rom to ram or vice-versa
32 fr=251: tu=252: tp=253: rem from, to and temp storage of drive type
33 :
34 input"from unit 8[157][157][157]";f
35 gosub123: rem get drvnum
36 f$=d$
37 input "1) serial or 2) ieee 2[157][157][157]";tf
38 if tf<1 or tf>2 then 37
39 :
40 input"to unit 8[157][157][157]";t
41 gosub123: rem get drvnum
42 t$=d$
43 input "1) serial or 2) ieee 1[157][157][157]";tt
44 if tt<1 or tt>2 then 43
45 :
46 if f=t and f$=t$ and tt=tf then run
47 :
48 poke fr,tf-1: poke tu,tt-1: rem drive type source and destination
49 sys(init): rem move rom to ram, etc.
50 xx=fr: gosub 136: n=0: close1: close15: open 15,f,15: print#15,"i"+f$
51 gosub127: if e then stop: goto 50
52 z=90: print: input"pattern *[157][157][157]";p$
53 p$="xxx"+left$(p$+"[160][160][160][160][160][160][160][160][160][160][160][160][160][160][160]",16)
54 print "hold down 'y' or 'n' key to select"
55 print "programs to be copied..."
56 open 1,f,3,"$"+f$: rem ok
57 gosub127: if e then stop: goto50
58 sys(z1)
59 r=255: goto 61
60 sys(z2)
61 for j=16to2step-1: if asc(mid$(a$,j+3))=160 then nextj
62 n$=mid$(a$,4,j)
63 t9=asc(a$)-128: if t9<1 or t9>4 goto75
64 l1%=asc(mid$(a$,22))
65 l2=asc(mid$(a$,29))+asc(mid$(a$,30))*256
66 print right$(" "+mid$(str$(l2),2),4)" :"mid$(a$,4,16)" "t$(t9)" "
67 p=peek(203) and r
68 get z$: if z$="" and p<064 goto73
69 if z$="y" or z$="n" then z=asc(z$): r=255: goto73
70 if z$=chr$(13) then r=0: goto73
71 goto68
72 :
73 if z<80 then print "[145] [145]": goto75
74 n=n+1: l2(n)=l2: n$(n)=n$: t%(n)=t9: l1%(n)=l1%
75 if st=0 and n<232 goto60
76 xx=fr: gosub 136: close1: close15: print " * * * * * "
77 if n=0 then print "* no programs *": goto 120
78 for j=1 to n
79 l2=l2(j): t%=t%(j): if l>l2 goto100
80 if q=0 goto84
81 print "*** output disk full"
82 input"do you have a new one";z$
83 if asc(z$)<>89 then 122
84 close15: xx=tu: gosub 136: rem swap to destination
85 open 15,t,15: input"want to new the output disk n[157][157][157]";z$
86 if asc(z$)<>89 goto92
87 :
88 input"disk name,id";x$,y$
89 print#15,"n"+t$+":"+x$+","+y$
90 gosub127: if e then stop: goto84
91 :
92 print#15,"i"+t$: open 1,t,0,"$"+t$+": !#$%&"
93 gosub127: if e then stop: goto84
94 gosub131: gosub131: q=q+1
95 get#1,x$: if x$<>"" goto95
96 gosub131
97 l=x+y*256: print "(";l;"blocks free )"
98 xx=tu: gosub 136: close1: close15: goto79
99 :
100 xx=fr: gosub 136: open 14,f,15: rem source cmd channel
101 xx=tu: gosub 136: open 15,t,15: rem dest cmd channel
102 print left$(n$(j)+" ",21);
103 xx=fr: gosub 136: open 3,f,3,f$+":"+n$(j)+","+t$(t%)
104 input#14,e,e$,e1,e2: gosub128: if e then print "** ";e$;e: goto117
105 :
106 xx=tu: gosub 136: rem destination
107 if t%=4 then open 4,t,4,t$+":"+n$(j)+",l,"+chr$(l1%(j)): goto111
108 :
109 open 4,t,4,t$+":"+n$(j)+","+t$(t%)+",w"
110 :
111 l=l-l2: gosub127: if e then print "*** ";e$;e: goto117
112 if t%=4 then sys(z4): goto114: rem relative copy
113 sys(z3)
114 xx=tu: gosub 136: rem set destination again
115 n$(j)="": gosub127: if e then print "**** ";e$;e: goto117
116 print "[145]"
117 xx=fr: gosub 136: close3: close14: rem source
118 xx=tu: gosub 136: close4: close15: rem destination
119 nextj
120 x=fre(0): input"another input disk ready";z$
121 if asc(z$)=89 goto50
122 poke 1,55: end
123 input"drive 0[157][157][157]";d
124 if d*d<>d goto123
125 d$=chr$(d+48): return
126 :
127 input#15,e,e$,e1,e2
128 if e=0 then e=(st and 191): e$="*st*"
129 return
130 :
131 get#1,x$,x$,x$
132 x=asc(x$+chr$(0))
133 get#1,x$: y=asc(x$+chr$(0))
134 return
135 :
136 poke tp,peek(xx): sys(swap): return: rem flip to source/destination drive